//////////////////////////////////////////////////////////////////////////
///	\file:	Define.h
///	Copyright (MingYou) 2009 - All Rights Reserved
///	Author:	Robert.Ma
///	Date:	[2009/05/13]
///	Description:
///		
//////////////////////////////////////////////////////////////////////////
#pragma once

//////////////////////////////////////////////////////////////////////////
//	TCP buffer.
const size_t TCPBUFFERSIZE  = 1024;
const size_t UDPBUFFERSIZE  = 2048;
const size_t BUFFERSIZE     = 16 * TCPBUFFERSIZE;
const size_t MAX_BUFFERSIZE = 2 * BUFFERSIZE;

//////////////////////////////////////////////////////////////////////////
//	Value of thread.
const DWORD WAITBUFFER_TIME     = 200;
const DWORD READ_SLEEP_TIME     = 200;

//////////////////////////////////////////////////////////////////////////
//	Message.

//	Thread message.
const UINT TM_THREAD_EXIT       = WM_USER + 100;
const UINT TM_SEND_TASK_START   = WM_USER + 101;
const UINT TM_SOCKET_ERROR      = WM_USER + 102;

const UINT TM_NM_CONNECT		= WM_USER + 150;
const UINT TM_NM_DISCONNECT		= WM_USER + 151;
const UINT TM_NM_CHECK_CONNECT	= WM_USER + 152;

const UINT TM_NR_READ_RECV      = WM_USER + 200;
const UINT TM_NR_READ_START     = WM_USER + 201;

const UINT TM_NW_SEND           = WM_USER + 250;
const UINT TM_NW_SENDED         = WM_USER + 251;

const UINT SOCK_ONRECEIVE       = WM_USER + 300;
const UINT SOCK_ONCLOSE         = WM_USER + 301;

//////////////////////////////////////////////////////////////////////////
//	Const value.
const LRESULT L_ZERO	= -1L;
const LRESULT L_OK		= 0L;
